package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.person.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PersonMapper;

import com.ruoyi.system.service.IPersonService;

/**
 * 类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class PersonServiceImpl implements IPersonService 
{
    @Autowired
    private PersonMapper personMapper;

    /**
     * 查询类别
     * 
     * @param personId 类别主键
     * @return 类别
     */
    @Override
    public Person selectPersonByPersonId(Integer personId)
    {
        return personMapper.selectPersonByPersonId(personId);
    }

    /**
     * 查询类别列表
     * 
     * @param person 类别
     * @return 类别
     */
    @Override
    public List<Person> selectPersonList(Person person)
    {
        return personMapper.selectPersonList(person);
    }

    /**
     * 新增类别
     * 
     * @param person 类别
     * @return 结果
     */
    @Override
    public int insertPerson(Person person)
    {
        return personMapper.insertPerson(person);
    }

    /**
     * 修改类别
     * 
     * @param person 类别
     * @return 结果
     */
    @Override
    public int updatePerson(Person person)
    {
        return personMapper.updatePerson(person);
    }

    /**
     * 批量删除类别
     * 
     * @param personIds 需要删除的类别主键
     * @return 结果
     */
    @Override
    public int deletePersonByPersonIds(Integer[] personIds)
    {
        return personMapper.deletePersonByPersonIds(personIds);
    }

    /**
     * 删除类别信息
     * 
     * @param personId 类别主键
     * @return 结果
     */
    @Override
    public int deletePersonByPersonId(Integer personId)
    {
        return personMapper.deletePersonByPersonId(personId);
    }
}
